package org.summerframework.core.util;

import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.HandlerExecutionChain;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * @author 石超
 * @version v1.0.0
 */
public class HandlerMethodUtil {
    public static HandlerExecutionChain getHandlerMethod(RequestMappingHandlerMapping requestMappingHandlerMapping, HttpServletRequest request) {
        try {
            return requestMappingHandlerMapping.getHandler(request);
        } catch (Exception e) {
            e.printStackTrace();
        }

        return null;
    }
}
